package com.yanqu.road.server.cmd.cookboy.process2;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.cookboy.CookBoyProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.cookboy.CrossCookBoyMgr;
import com.yanqu.road.server.protocol.Protocol;

/**
 * @Author : Cxp
 * @Time : 2024-12-17
 * @Description : 同步自动回访汤勺数量
 */

@Cmd(code = Protocol.C_CROSS_COOK_BOY2_SYNC_AUTO_JOIN_SPOON, desc = "同步自动回访汤勺数量")
public class CrossCookBoy2SyncAutoJoinSpoonCmd extends CrossCommand {
    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        CookBoyProto.CrossCookBoy2SyncAutoJoinSpoonMsg reqMsg =
                CookBoyProto.CrossCookBoy2SyncAutoJoinSpoonMsg.parseFrom(packet.getBytes());

        int activityId = reqMsg.getActivityId();
        CrossCookBoyMgr.syncAutoJoinSpoon(serverId, activityId, reqMsg);
    }

    @Override
    public void sendData() {
    }
}